<?php 
require_once('Connections/tecno.php'); 
session_start();

$id = $_GET['id'];

mysql_select_db($database_tecno, $tecno); //  
$query_buscar = "SELECT * FROM datospersonales WHERE id = '$id'";
$buscar = mysql_query($query_buscar, $tecno) or die(mysql_error());
$row_buscar = mysql_fetch_assoc($buscar);
$totalRows_buscar = mysql_num_rows($buscar);

?>
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/jquery.fancybox-1.3.1.css" media="screen" />
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="jquery/development-bundle/ui/jquery-ui-1.8.11.custom.js"></script>
<script type="text/javascript" src="js/ui/ui.core.js"></script>
<script type="text/javascript" src="jquery/development-bundle/ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="jquery/development-bundle/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="jquery/development-bundle/ui/jquery.ui.autocomplete.js"></script>
<script type="text/javascript" src="js/ui/ui.tabs.js"></script>
<script type="text/javascript" src="js/jquery.fancybox-1.3.1.pack.js"></script> 
<script type="text/javascript" src="js/jquery.easing-1.3.pack.js"></script>
<SCRIPT type="text/javascript" src="js/alertbox.js"></SCRIPT>
<link rel="stylesheet" type="text/css" href="jquery/css/smoothness/jquery-ui-1.8.11.custom.css"/>
<LINK rel="stylesheet" type="text/css" media="all" href="css/style.css"><!--estilo de ventana alerta -->
<?php if ($totalRows_buscar > 0) {?>
<script language="javascript">

$(document).ready(function(){
	$("#id").val('<?php echo $row_buscar['id']; ?>');	
	$("#cedula").val('<?php echo $row_buscar['cedula']; ?>');	
	$("#nombres").val('<?php echo $row_buscar['nombres']; ?>');	
	$("#apellidos").val('<?php echo $row_buscar['primerApellido']; ?>');	


$("#continuar").click(function(){
		$.post('EliminarCliente.php', $("#dat").serialize(),function(data){
				csscody.alert("Usuario Eliminado!!!");
				$("#continuar").css("display","none");
				$("#eliminar_cliente").css("display","none");
				$("#cerrar").css("display","inline");
			

		}); 		
		return false; 	
	}); 

$("#cancelar").click(function(){
$.fancybox.close();
}); 




});
</script>
<?php } else {?>
<?php echo "3"; } ?>
<div id="datos" class="form" style="margin:10px 20px 0 20px;width:700px;float:left;">
           <form name="dat" id="dat">           
           	<fieldset>
           	  <legend>Esta seguro que desea eliminar el Cliente?</legend>
           	  <input type="hidden" id="id" name="id" />
                <label for="cedula" class="label-peq1">C&eacute;dula:</label>
                <input type="text" id="cedula" name="cedula" value="" readonly="readonly" class="input-med" style="float:left;" />
                <label for="nombres" class="label-peq1" style="margin-left:25px;">Nombres:</label>
                <input type="text" id="nombres" name="nombres" readonly="readonly" class="input-med" style="float:left;" />
                <label for="apellidos" class="label-peq1" style="margin-left:25px;">Apellidos:</label>
                <input type="text" id="apellidos" name="apellidos" readonly="readonly" class="input-med" style="float:left;" />
           	</fieldset>
           </form>
            		<div id="btVarios" style="padding-left:400px;">
                        	 <a id="continuar" href="#">
                         	<div class="botonCustom" style="margin:0 0 5px 5px; float:left">Continuar</div> </a>
                            
                           <div id="eliminar_cliente" class="botonCustom" style="margin:0 0 5px 5px; display:inline;" onclick="parent.$.fancybox.close();">Cancelar</div>
                           
                    <div id="cerrar" class="botonCustom" style="margin:0 0 5px 5px; float:right; display:none;" onclick="parent.$.fancybox.close();">Cerrar</div>
                        
                   </div>	                
            <div id="resultado"></div>
        </div>
        </div>